#region Usings

using Karma.Framework.Core.Repository;
using Ninject.Core;
using Karma.Framework.Core.Metadata.Mapping;
using Karma.Framework.Core.Metadata.Repository;
using Karma.Framework.Core.Metadata.Service;

#endregion

namespace Karma.Framework.Core.Metadata
{
    public class ApplicationModule : StandardModule
    {
        #region Overrides of ModuleBase<IBindingTargetSyntax,IAdviceTargetSyntax>

        public override void Load()
        {
            // repositorios 
            Bind<IRepository<Entity>>().ToMethod(repo => RepositoryFactory.Create<Entity>());
            Bind<IRepository<Query>>().ToMethod(repo => RepositoryFactory.Create<Query>());
            Bind<IApplicationRepository>().To<ApplicationRepository>();

            //servicios
            Bind<IApplicationService>().To<ApplicationService>();
        }

        #endregion
    }
}